<layout
  th:replace="~{views/layout :: layout (
  page = 'single',
  title = ${singlePage.spec.title} ,
  pin = ~{::pin},
  header = ~{::header},
  main = ~{::main}
  )}"
>
  <!--/* pin */-->
  <th:block th:fragment="pin">
    <script id="pageScript" th:inline="javascript" th:with="above_background = ${ #strings.isEmpty(singlePage.spec.cover) ? theme.config.index.above_background : (theme.config.loading.img.random_enable ? theme.config.loading.img.random_link  : ''  )}">
      Object.assign(window.MainApp.conf, {
        //第一屏
        enable_above: /*[[${theme.config.index.enable_above}]]*/ '',
        above_background: /*[[${above_background}]]*/ '',
      });
    </script>
  </th:block>


  <!--/* header */-->
  <th:block th:fragment="header">
    <header th:class="${not theme.config.index.enable_above ? 'header dp' : 'header'}">
      <!--/* 导航栏 */-->
      <th:block th:replace="~{views/nav}"/>

      <!--第一屏内容-->
      <section class="above" th:if="${theme.config.index.enable_above}">
        <div class="above-info">
          <h1 class="above-title" th:text="${singlePage.spec.title}"></h1>
        </div>
      </section>
    </header>
  </th:block>


  <!--/* 內容 */-->
  <th:block th:fragment="main">
    <section class="content card">
      <article class="render" th:utext="${singlePage.content.content}"></article>
      <halo:comment
        th:if="${pluginFinder.available('PluginCommentWidget') && haloCommentEnabled && singlePage.spec.allowComment}"
        group="content.halo.run"
        kind="SinglePage"
        th:attr="name=${singlePage.metadata.name}"
      />
    </section>
    <th:block th:replace="~{views/aside::common}"/>
  </th:block>
</layout>